#!/usr/bin/env python3
# -*- coding:utf-8 -*-

# 1) match...case, case 也可以设置多个匹配条件，如case 401|403|404:
def http_error(status):
    match status:
        case 400:
            return "Bad request"
        case 404:
            return "Not found"
        case 418:
            return "I'm a teapot"
        case _: # case _: 类似于 C 和 Java 中的 default:
            return "Something's wrong with the internet"

mystatus=400
print(http_error(400))
